<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 

<h:head></h:head> 
<body> 
	<p:panel id="Painel" header="Login">

    	<p:focus context="painel"/>  
          
        <p:messages />  
          
        <h:panelGrid columns="3">  
            <h:outputLabel for="usuario" value="Usuário: *" />  
            <p:inputText id="usuario" required="true" label="Usuario"  
                    value="#{personBean.firstname}" >  
                <f:validateLength minimum="2" />  
            </p:inputText>  
            <p:message for="usuario" />  
              
            <h:outputLabel for="senha" value="Senha: *" />  
            <p:inputText id="senha" required="true" label="Senha"  
                    value="#{personBean.surname}" />  
            <p:message for="senha" />  
        </h:panelGrid>  
          
        <p:commandButton value="Ok" update="painel"   
                    actionListener="#{personBean.savePerson}" /> 
			
	</p:panel>
</body> 
</html>
